﻿using System.Collections.Generic;
using System.Collections;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using System;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Xml.Schema;

namespace ScormModel
{
    [Serializable()]
    public class FileRef
    {
        private string _bref;
         [NonSerialized]
        private XmlNode _fileRefContent;
        [XmlAttribute("bref")]
        public string Bref
        {
            get { return this._bref; }
            set { this._bref = value; }
        }
        
        [XmlIgnoreAttribute]
        public XmlNode FileRefContent
        {
            get { return this._fileRefContent; }
            set { this._fileRefContent = value; }
        }
        public void buildFileRef()
        {
            XmlAttributeCollection attList = _fileRefContent.Attributes;
            for (int i = 0; i < attList.Count; i++)
            {
                if (attList[i].Name == "href")
                {
                    _bref = attList[i].Value;
                }
            }		
        }
    }
}
